﻿using Biomedica.Graphics;
using KinectWindowLib;
using KinectWindows.Math;
using KinectWindows.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Threading.Tasks;
using System.Timers;

namespace KinectWindows
{
    public static class WindowManager
    {

        public static class WindowManagerLooper
        {
           
            private static Boolean Run { set; get; }
            public static void StartNewApplication(NuiApplication app)
            {
               
                System.Threading.Thread th = new System.Threading.Thread(new System.Threading.ThreadStart(app.Start));
                app.OSThreadId = th.ManagedThreadId;
                th.Start();                
               
            }
          
            public static void Start()
            {

                Run  = true; 
               
                while (Run)
                {
                    NuiEvent nevent = NuiEventManager.GetEvent();
                    if (nevent != null )
                    {
                       
                    }
                }

            }
            public static void Stop()
            {
                Run = false;
            }

            public static bool ProcesMessage { get; set; }
        }


       
    } 
}
